﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BS_2.VTKClass
{
    public class Face
    {
        public int[] getFaces()
        {
            return faces;
        }

        public void setFaces(int[] faces)
        {
            this.faces = faces;
        }

        int[] faces;
        public Face(int[] num)
        {
            faces = num;
        }
        public Face(int num, int num2, int num3, int num4)
        {
            faces = new int[] { num, num2, num3, num4 };
        }

        public bool equals(Object obj)
        {

            if (obj == this) return true;
            if (obj is Face)
            {
                Face other = (Face)obj;
                int[] fac = other.getFaces();
                if (fac.Count() == faces.Count())
                {

                    bool bo = true;
                    for (int i = 0; i < this.faces.Count(); i++)
                    {
                        bo = fac[i] == faces[i];
                        if (bo == false)
                            return false;
                    }
                    return true;
                }
                else
                {
                    return false;
                }

            }
            else return false;
        }
    }
}
